﻿using BBCore.Core.Models.BaseModels;
using FreeSql.DataAnnotations;
using Magicodes.ExporterAndImporter.Core;
using Magicodes.ExporterAndImporter.Excel;
using System.ComponentModel.DataAnnotations;

namespace BBCore.Core.Models.Samples
{
    [ExcelImporter(IsLabelingError = true)]
    [Index("UK_NAME", "Name", true)]
    public class HYJ_Single_Table: BaseModel
    {
        [ImporterHeader(IsIgnore = true)]
        [Column(IsIdentity = true)]
        public int Id { get; set; }

        [ImporterHeader(Name = "名称", IsAllowRepeat = false, Format = "@")]
        [Required(ErrorMessage = "名称不能为空")]
        public string? Name { get; set; }
        [ImporterHeader(Name = "价格")]
        [Range(0, 10000, ErrorMessage = "价格必须在0-10000之间")]
        public decimal Price { get; set; }
        [ImporterHeader(Name = "日期")]
        public DateTime Date { get; set; }

   
    }
}
